package VN.EDU.IMIC.DEVELOPER.TRINHCAOSANG.BaiTapObject.Exc5;

/**
 * Created by Sang on 29/02/2016.
 */
public class CoupleModel {
        String result;
    public boolean checkName(CoupleData nameData) {
        if (nameData.getName().equals("")) {
            return false;
        }
        return true;
    }

    public boolean checkAge(CoupleData nameData) {
        if (nameData.getAge() == 0) {
            return false;
        }
        return true;
    }
    public boolean  checkStatus(CoupleData nameDate){
            if (nameDate.getStatus().equals("")){
                return false;
            }
            return true;
    }

    public boolean  checkInfo(CoupleData nameDate){
        if (nameDate.getGender().equals("Nam") && nameDate.getAge()>=22 &&
                ( nameDate.getStatus().equals("Doc than") || nameDate.getStatus().equals("Ly hon")))
        {
            return true;

        }
        else if (nameDate.getAge()<=19) {

            System.out.println("You can't join this program");
            return false;
        }
        if (nameDate.getGender().equals("Nu")&& nameDate.getAge()>=19 &&
                ( nameDate.getStatus().equals("Doc than") || nameDate.getStatus().equals("Ly hon"))) {
            return true;
        }
        return false;
    }

}
